import 'package:flutter/material.dart';
import 'package:test1/View/MyRowText.dart';
import 'package:test1/pages/widgets/Widget_TabBar_Default_Page.dart';
import 'package:test1/pages/widgets/Widget_TabBar_Userdefined_Page.dart';

class Widget_TabBar_Page extends StatefulWidget {
  @override
  State<StatefulWidget> createState() {
    return Widget_TabBar_State_Page();
  }
}

class Widget_TabBar_State_Page extends State<Widget_TabBar_Page> {

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: Text("TabBar"),
        ),
        body: Column(
          children: <Widget>[
            MyRowText("默认TabController", () =>
                Navigator.push(
                    context, MaterialPageRoute(builder: (BuildContext context) {
                  return Widget_TabBar_Default_Page();
                }))
            ),
            MyRowText("自定义TabController", () =>
                Navigator.push(
                    context, MaterialPageRoute(builder: (BuildContext context) {
                  return Widget_TabBar_Userdefined_Page();
                }))
            ),
          ],
        ),
      ),
    );
  }
}
